<!DOCTYPE html>
<html lang="zh-CN"
	  xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	  layout:decorator="fragments/adminModel">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>博文列表</title>
		<script type="text/javascript">
			$(function() {
				$(".delete-obj-href").deleteFun();
			});
		</script>
	</head>
<body>
	<div th:fragment="content" th:remove="tag">
		<div class="header lighter smaller blue">
			<h3><span class="glyphicon glyphicon-th-list"></span>&nbsp;博文列表<small>（<span th:text="${datas.totalElements}"></span>）</small></h3>
			<div th:replace="admin/article/nav :: content" th:remove="tag"></div>
		</div>

        <div th:replace="admin/article/filter :: content" th:remove="tag"></div>

		<div class="table-responsive">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>用户</th>
						<th>分类</th>
						<th>标题</th>
						<th>显示</th>
						<th>推荐</th>
						<!--<th>操作</th>-->
					</tr>
				</thead>

				<tbody>
					<tr th:each="obj : ${datas}">
						<th><a th:href="'/admin/article/list?filter_accountId='+${obj.accountId}" th:text="${obj.accountName}"></a></th>
						<th><a th:href="'/admin/article/list?filter_cateId='+${obj.cateId}" th:text="${obj.cateName}"></a></th>
						<td><a th:href="'/web/article/detail/'+${obj.id}" th:text="${obj.title}"></a></td>
						<td>
							<p th:if="${obj.isShow eq 1}">
								<i class="fa fa-eye"></i> 显示[<a th:href="'/admin/article/updateField?field=isShow&amp;val=0&amp;id='+${obj.id}" class="delete-obj-href" th:title="'确定设置【'+${obj.title}+'】为不显示吗？'">隐藏</a>]
							</p>
							<p th:unless="${obj.isShow eq 1}">
								<i class="fa fa-eye-slash"></i> 隐藏[<a th:href="'/admin/article/updateField?field=isShow&amp;val=1&amp;id='+${obj.id}" class="delete-obj-href" th:title="'确定设置【'+${obj.title}+'】为显示吗？'">显示</a>]
							</p>
						</td>
						<td>
							<p th:if="${obj.isGood eq 1}">
								<i class="fa fa-thumbs-up"></i> 推荐[<a th:href="'/admin/article/updateField?field=isGood&amp;val=0&amp;id='+${obj.id}" class="delete-obj-href" th:title="'确定设置【'+${obj.title}+'】为不推荐吗？'">不推</a>]
							</p>
							<p th:unless="${obj.isGood eq 1}">
								<i class="fa fa-thumbs-down"></i> 未推[<a th:href="'/admin/article/updateField?field=isGood&amp;val=1&amp;id='+${obj.id}" class="delete-obj-href" th:title="'确定设置【'+${obj.title}+'】为推荐吗？'">推荐</a>]
							</p>
						</td>
					</tr>
				</tbody>
			</table>
			<div th:include="fragments/page :: pager" th:remove="tag"></div>
		</div>
	</div>
</body>
</html>